from PySide6.QtCore import QObject, Signal, Slot, Property
from PySide6.QtQml import QmlElement, qmlRegisterType

class HomeViewModel(QObject):
    messageChanged = Signal(str)
    def __init__(self):
        super().__init__()
        self.title = "Home"
        self._message = "Welcome to the Home Page"
    @Property(str,notify=messageChanged)
    def message(self):
        return self._message
    @message.setter
    def message(self, value):
        if self._message != value:
            self._message = value
            self.messageChanged.emit(self._message)